So to find the row that satisfies the predicate in the select statement, the optimizer has to lock, read in, and compare all the rows in the main table with the value supplied in the predicate. 因此要找到满足select语句中谓词的行,这个优化器必须将主表中的所有行上锁、读取它们的值并与谓词中提供的值进行比较。
Since this query contains no value predicate to restrict either the books or the authors table, DB2 has to perform a table scan on either of the two tables to read all author IDs. 由于该查询没有包含用来限制books或authors表的值谓词,因此DB2必须在两个表上执行表扫描,以便读取所有authorID。
Thus, if you use SQL/ XML to query XML data, you must include a WHERE clause with an XMLExists() function ( or other filtering predicate) to ensure your results don't include a row for every row present in the table. 因此,如果使用SQL/XML查询XML数据,就必须包括一个WHERE子句,并在其中使用XMLExists()函数(或其他过滤谓词)来确保结果中不会为表中的每个行都包括一行。
Predicates are reordered and regrouped based on the kind of predicate ( local or join) and the table reference. 重新排序和重新组合谓词是基于谓词的种类(本地或联接)和表引用。